package j.framework.qmd.core;

import j.util.New;

import java.io.Serializable;
import java.util.Map;

/**
 * User: jason
 * Date: 2014/11/13 15:45
 */
public class DataGridColumn implements Serializable,Comparable<DataGridColumn> {
    private String title;
    private boolean isSuperHeader;
    private String fieldKey;
    private int displayOrder;

    public final Map<String,DataGridColumn> subColumns = New.lMap();

    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }

    public boolean isSuperHeader() {
        return isSuperHeader;
    }
    public void setSuperHeader(boolean isSuperHeader) {
        this.isSuperHeader = isSuperHeader;
    }

    public String getFieldKey() {
        return fieldKey;
    }
    public void setFieldKey(String fieldKey) {
        this.fieldKey = fieldKey;
    }

    public int getDisplayOrder() {
        return displayOrder;
    }
    public void setDisplayOrder(int displayOrder) {
        this.displayOrder = displayOrder;
    }

    @Override
    public int compareTo(DataGridColumn o) {
        return this.getDisplayOrder()-o.getDisplayOrder();
    }
}
